﻿
<div class="register-container animated fadeInDown" ng-controller="RegisterController">
    <div class="registerbox bg-white">
        <div class="logobox">
            <p class="text-center">
                <a ui-sref="app.dashboard">
                    <img src="assets/img/logo_login.png" width="150" />
                    </a>
            </p>
        </div>        
       <h3 class="text-center">Register <i class="fa fa-circle-o-notch fa-spin" ng-show="processing"></i></h3>       
        <form name="simpleForm" class="form-horizontal bv-form" novalidate="novalidate" ng-submit="doSignup(User)">
            <!--<div class="registerbox-caption ">Please fill in your information</div>-->
            <div class="registerbox-textbox" ng-class="{ 'has-error' : simpleForm.required.$invalid && !simpleForm.required.$pristine }">
                <input type="text" class="form-control" placeholder="Sponsor" ng-model="User.Sponsor" required />
                <p ng-show="simpleForm.User.Sponsor.$invalid && !simpleForm.User.Sponsor.$pristine" class="help-block">This field is required.</p>
            </div>

            <div class="registerbox-textbox" ng-class="{ 'has-error' : simpleForm.required.$invalid && !simpleForm.required.$pristine }">
                <input type="text" class="form-control" placeholder="Sponsor 2" ng-model="User.Sponsor2" required />
                <p ng-show="simpleForm.User.Sponsor2.$invalid && !simpleForm.User.Sponsor2.$pristine" class="help-block">This field is required.</p>
            </div>

            <div class="registerbox-textbox">
                <input type="text" class="form-control" placeholder="Username" ng-model="User.UserName" required />
            </div>
            <div class="registerbox-textbox">
                <input type="password" class="form-control" placeholder="Enter Password" ng-model="User.Password" required />
            </div>
            <div class="registerbox-textbox">
                <input type="password" class="form-control" placeholder="Confirm Password" ng-model="User.Password2" required />
            </div>
            <div class="registerbox-textbox" ng-class="{ 'has-error' : simpleForm.Email.$invalid && !simpleForm.Email.$pristine }">
                <input type="email" class="form-control" placeholder="Email" ng-model="User.Email" required />
                <p ng-show="simpleForm.email.$invalid && !simpleForm.email.$pristine" class="help-block">This field must be a valid Email Address</p>
            </div>
            <div class="registerbox-textbox">
                <input type="text" class="form-control" placeholder="Phone" ng-model="User.SDTNHARIENG" required />
            </div>

            <div class="registerbox-submit text-center">
                <button class="btn btn-primary" type="submit" ng-disabled="processing">
                    SUBMIT
                </button>
            </div>
            <div class="registerbox-submit text-align-center">
                <div class="btn-group">
                    <button class="btn btn-link" ui-sref="contact">Contact</button>
                    <a class="btn btn-link" ui-sref="login">login</a>
                </div>
            </div>
        </form>
            <!--Success Modal Templates-->
            <script type="text/ng-template" id="WarningModal">
                <div class="modal-header">
                    <i class="glyphicon glyphicon-check"></i>
                </div>
                <div class="modal-title">{{title}}</div>
                <div class="modal-body">
                    {{ messeger }}
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success" ng-click="ok()">OK</button>
                    <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
                </div>
            </script>
            <!--End Success Modal Templates-->
            <!--Success Modal Templates-->
            <script type="text/ng-template" id="SuccessModal">
                <div class="modal-header">
                    <i class="glyphicon glyphicon-check"></i>
                </div>
                <div class="modal-title">{{title}}</div>
                <div class="modal-body">
                    {{ messeger }}
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success" ng-click="ok()">Go Login</button>
                    <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
                </div>
            </script>
            <!--End Success Modal Templates-->
</div>   
</div>